<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>

	<link rel="stylesheet" type="text/css" href="http://static.joyowo.com/lib/cmd-plugins/ueditor/1.0.0/themes/default/css/ueditor.css">

	<script type="text/javascript" src="http://static.joyowo.com/lib/seajs/2.3.0/sea-debug.js"></script>
	<script type="text/javascript" src="http://static.joyowo.com/lib/seajs-plugins/seajs-preload/1.0.0/seajs-preload.js"></script>
	<script type="text/javascript" src="http://static.joyowo.com/public/xm/config/seajs/seajs-config.js"></script>

</head>
<body>

<div>
  <h1>demo</h1>
  <script id="myEditor" type="text/plain">我是默认内容</script>
</div>
<button class="add">追加内容</button>
<script type="text/javascript">
seajs.use(['{plugins}/ueditor/1.0.0/ueditor'],function(){
	UE.getEditor('myEditor',{
	  toolbars:[['undo','redo','|','bold','italic','underline','fontfamily','fontsize','|','','indent','|','justifyleft','justifycenter','justifyright','justifyjustify']],
	  autoClearinitialContent:true,
	  //关闭字数统计
	  wordCount:false,
	  //关闭elementPath
	  elementPathEnabled:false,
	  initialFrameHeight:300,
	  initialFrameWidth: 500,
	  saveInterval: 5000000,
	  autoHeightEnabled: false
	})

	function insertHtml() {
	  var value = prompt('插入html代码', '');
	  UE.getEditor('myEditor').execCommand('insertHtml', value)
	}

	$('.add').click(function(){
		insertHtml();
	})
})
</script>

</body>
</html>